<@override name="link">
<link href="${base}/resources/admin/css/plugins/iCheck/custom.css" rel="stylesheet">
</@override>
<@override name="body">
<body class="gray-bg">
<div class="col-sm-12">
    <div class="ibox">
        <div class="ibox-title">
            <h5>公文类型管理</h5>
            <div class="ibox-tools">
                <a href="add.html" class="dropdown-toggle" title="添加部门">
                    <i class="fa fa-arrows"></i>
                </a>
            </div>
        </div>
        <div class="ibox-content">
            <form action="index.html">
                <div class="row">
                    <div class="tabs-container">
                        <ul class="nav nav-tabs">
                            <li class="">
                                <a data-toggle="tab"  aria-expanded="false"> 收文</a>
                            </li>
                            <li class="active">
                                <a data-toggle="tab"  aria-expanded="true">发文</a>
                            </li>
                        </ul>

                    </div>
                    <div class="row" style="margin-top: 5px">
                        <div class="col-sm-9 m-b-xs"></div>
                        <div class="col-sm-3">
                            <div class="input-group">
                                <input type="hidden" name="pageNumber" id="pageNumber" value="${pageable.pageNumber}">
                                <input type="hidden" name="pageSize" id="pageSize" value="${pageable.pageSize}">
                                <input type="text" placeholder="权限的名称" name="key" value="<#if key??>${key}</#if>" class="input-sm form-control">
                                <input type="hidden" name="type" value="<#if type??>${type}</#if>">
                                <span class="input-group-btn">
                                    <button type="submit" class="btn btn-sm btn-primary"> 搜索</button>
                                </span>
                            </div>
                        </div>
                    </div>
                </div>
            </form>
            <table class="table table-striped">
                <thead>
                    <tr>
                        <td>编码</td>
                        <td>标题</td>
                        <td>状态</td>
                        <td>类型</td>
                        <td>监控人员</td>
                        <td>发布人</td>
                        <td>操作</td>
                    </tr>
                </thead>
                <tbody>
                    <#list page.contents as type>
                        <tr>
                            <td>${type.number?c}</td>
                            <td>${type.title}</td>
                            <td></td>
                            <td></td>
                            <td>
                                <#list type.supervisions as super>
                                    <span class="label label-primary">
                                        ${super.info.realName}
                                    </span>
                                </#list>
                            </td>
                            <td>
                                <span class="label label-primary">
                                    ${type.issue.username}
                                </span>
                            </td>
                            <td>
                                <a href="javascript:;" class="btn btn-xs btn-primary" data-id="${type.id}" title="编辑类型">
                                    <i class="fa fa-edit"></i>
                                </a>
                                <a href="../flow/index.html?typeId=${type.id}" class="btn btn-xs btn-primary" data-id="${type.id}" title="设置流程">
                                    <i class="fa fa-facebook"></i>
                                </a>
                                <a href="javascript:;" class="btn btn-xs btn-primary" data-id="${type.id}" title="配置模板">
                                    <i class="fa fa-server"></i>
                                </a>
                            </td>
                        </tr>
                    </#list>
                </tbody>
            </table>
        </div>
    </div>
</div>
<!-- 添加部门的弹出框 -->
<div class="modal inmodal" id="addDepartment" tabindex="1" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content animated fadeInDown">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">
                    <span aria-hidden="true">&times;</span>
                    <span class="sr-only">Close</span>
                </button>
                <i class="fa fa-user-md modal-icon"></i>
                <h4 class="modal-title">创建公文</h4>
            </div>
            <form action="submit" id="submitForm" method="post" class="form-horizontal">
                <div class="modal-body">
                    <div class="form-group">
                        <input type="hidden" id="parentId">
                        <label for="departmentName" class="col-sm-3 control-label">
                           名称
                        </label>
                        <div class="col-sm-8">
                            <input type="text" class="form-control" name="name" id="departmentName"/>
                        </div>
                    </div>
                    <input type="hidden" id="id">
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-white" data-dismiss="modal">关闭</button>
                    <button type="submit" class="btn btn-primary">保存</button>
                </div>
            </form>
        </div>
    </div>
</div>
</body>
</@override>
<@override name="script">
<script type="text/javascript" src="${base}/resources/admin/js/plugins/iCheck/icheck.min.js"></script>
<script type="text/javascript" src="${base}/resources/admin/js/appsType.js"></script>
<script type="text/javascript">
    AppsType.index();
    Common.checkbox();
</script>
</@override>
<@extends name="../base/main.html"/>